home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / インターネット/通信 / netpresenz-4.01.sea / netpresenz-4.01 / NetPresenz-401 / Documentation / Extra Documentation < prev    next >
Text File  |  1996-02-14  |  21KB  |  377 lines

  1. Remote Site Access Restrictions
  2.  
  3. You can limit the machines that can access your site by restricting access to certain IP ranges.  Because this would be very messy to do in a sensible user interface, the only way to set these restrictions is by using ResEdit.  From ResEdit, create a STR# resource (in either the NetPresenz Preferences file or NetPresenz (the former overrides the latter), give it an id in the range of 600-699, and a name ending of:
  4.  
  5. メ<username> Site Restrictionモ where <username> is the user you are restricting.
  6. メOwner Site Restrictionモ to restrict the owner.
  7. メUser Site Restrictionモ to restrict any unspecified user.
  8. メAnonymous Site Restrictionモ to restrict anonymous logins.
  9. メDefault Site Restrictionモ to restrict anyone not specified above.
  10.  
  11. NetPresenz checks them in that order (for gopher restrictions, it checks Anonymous Site Restriction or Default Site Restriction).  Each resource consists of a sequence of pairs, IP number, IP mask, both in dotted decimal format (eg 134.7.70.70).  The remote IP is checked against the IP, with only the bits in the mask being relevant.  If it matches then the user is allowed access.  If it matches, but the IP string started with an exclamation mark then access is disallowed.  The last match overrides previous ones, and if there are no matches then access is denied.
  12.  
  13. By default, NetPresenz has a single メDefault Site Restrictionモ STR# resource, which contains 0.0.0.0, 0.0.0.0 so access is allowed from anywhere.
  14.  
  15. Here are some examples, first if you just wanted to restrict anonymous logins to inside 134.7, and everyone else has no restriction, then you create two STR# resources, either in NetPresenz Preferences (which is checked first) or NetPresenz, like this:
  16.  
  17. メAnonymous Site Restrictionモ: 134.7.0.0,255.255.0.0
  18.  
  19. You don't need to create the メDefault Site Restrictionモ, because it already exists in NetPresenz, if you wish to override the default, either change it in NetPresenz or add a メDefault Site Restrictionモ to NetPresenz Preferences.
  20.  
  21. Ok, and a more complicated one, say you wanted anonymous access to everywhere inside 134.7 except 134.7.70.70, user access to everywhere inside 134.7 and 130.95, user "Fred" and the owner access from everywhere, do this:
  22.  
  23. メAnonymous Site Restrictionモ: 134.7.0.0,255.255.0.0, !134.7.70.70,255.255.255.255
  24. メUser Site Restrictionモ: 134.7.0.0,255.255.0.0, 130.95.0.0,255.255.0.0
  25. メOwner Site Restrictionモ: 0.0.0.0,0.0.0.0
  26. メFred Site Restrictionモ: 0.0.0.0,0.0.0.0
  27.  
  28. Note: These restrictions apply only to the control connection, not the data transfer connections, so it is still possible to use proxy-ftp to transfer files directly to a restricted machine, but the user must be connected from an allowed site.
  29.  
  30. Warranty
  31.  
  32. This program should do what Iユve described in this document.  If it doesnユt, you can simply stop using it.  If you pay me, and within a year find that it doesnユt do what I describe here, then you can notify me and I will refund your money and cancel your license.
  33.  
  34. Fine Print
  35.  
  36. Peter Lewis and Stairways Software Pty Ltd hereby disclaims all warranties relating to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose.  Peter Lewis and Stairways Software Pty Ltd will not be liable for any special, incidental, consequential, indirect or similar damages due to loss of data or any other reason, even if Peter Lewis, Stairways Software Pty Ltd, or an agent of his has been advised of the possibility of such damages.  In no event shall Peter Lewis or Stairways Software Pty Ltd be liable for any damages, regardless of the form of the claim.  The person using the software bears all risk as to the quality and performance of the software.
  37.  
  38. US Government:
  39.         Government End Users:  If you are acquiring the Software and fonts
  40. on behalf of any unit or agency of the United States Government, the
  41. following provisions apply.  The Government agrees:
  42.         (i) if the Software and fonts are supplied to the Department of
  43. Defense (DoD), the Software and fonts are classified as "Commercial
  44. Computer Software" and the Government is acquiring only "restricted rights"
  45. in the Software, its documentation and fonts as that term is defined in
  46. Clause 252.227-7013(c)(1) of the DFARS; and
  47.         (ii) if the Software and fonts are supplied to any unit or agency
  48. of the United States Government other than DoD, the Government's rights in
  49. the Software, its documentation and fonts will be as defined in Clause
  50. 52.227-19(c)(2) of the FAR or, in the case of NASA, in Clause
  51. 18-52.227-86(d) of the NASA Supplement to the FAR.
  52.  
  53. Acknowledgements
  54.  
  55. Thanks to RobT for suggesting the idea, to Quinn for demanding the use of System 7 U&G, and to Jager for figuring out how! Thanks to Quinn (again :) for the amazing icons and to Greg for colouring them in.  And special thanks again to Jager and Quinn for figuring out my async problems!  And, of course, thanks to Stuart for delaying the release of this program for ages by making LOTS of suggestions, finding LOTS of bugs, and by writing Bolo! Thanks also to the UCC, Todd, Steve, c.s.m.p, archie.au, ftp.apple.com, Farhad, Tom, Andr'e, Aron, Ben, David, Gregory, Guy, Igor, Jim, John, Ken, Leonard, Frederic, Pete, Peter, Richard (who won the award for the most mail messages (after Quinn)), Rob, Russell, Thede, Tom, Zep, and anyone who uses NetPresenz!  
  56.  
  57. I canユt describe how important the beta testers have been in making NetPresenz what it is, without them NetPresenz would not be a shadow of what it is now.  So special thanks go to all of you who made suggestions or pointed out problems.  I tried to list you all, but I gave up, there are just too many.  Some of you made so many suggestions I couldn't count them all.  Some of you analysed the network packets to find out what was happening and explained where I was going wrong.  Some decompiled my code and sent it back to me with corrections.  Some made suggestions that involved tiny changes with great benefits.  Some made outrageous demands which I refused to do, and others outrageous demands which I eventually did.  All of these would have been missing if I was working on my own.  Thanks.
  58.  
  59. Thanks also to Mike Marburger for the closing sound.
  60.  
  61. How It Works
  62.  
  63. NetPresenz listens for TCP connections on port 21.  When a connection is achieved, it waits for commands to be sent to it.  Commands all have a simple form, there is a 3 or 4 character command (eg, RETR for retrieve file), and some parameters (eg, filename).  NetPresenz interprets these commands, carries out their actions, and replies with a one line message, the first three characters of which are a 3 digit reply that can be interpreted by the FTP client, then the rest is human readable information.  The reply codes are 1yz for preliminary success (action started), 2yz for complete success (action finished successfully), 3yz for intermediate success (requires another command before any action is taken), 4yz for temporary failure (try again later), and 5yz for permanent failure (give up and go home).  For more information on the formats of these commands see the various FTP related RFCs.  Some commands may reply with a multiline response, in which the first line begins with a three digit response code followed by a dash メ-モ followed by several lines of text and terminated by a line with the same response code and a space followed by some text.  This confuses some servers, you can disable this feature by starting your username or password with a dash メ-モ.
  64.  
  65. NetPresenz also listens to port 70 for gopher connections.  It then accepts a single line specifying either a folder, file, or index, and returns the info for it.  The gopher server logs in as an AppleShare guest user, so guest access must be enabled (it was either that, or NetPresenz would have to know a user password, which I wanted to avoid).  The root of the gopher tree is specified by the login directory for fake user メGopherモ (it defaults to /).  This root is enforced, so you canユt have aliases pointing to folders outside this area (well, you can, but it won't work very well).  Aliases to files outside the area work.  You can reduce this restriction with the メGopherRootモ user directory, but that will allow anyone knowledgeable in the gopher protocol to get at any file inside that root.
  66.  
  67. NetPresenz talks to the file system on the local Mac (and other servers) exclusively by using the same protocols as if it were accessing an AppleShare server (the single exception is the startup messages which are read via normal file system calls).  The user logs in by giving a user name and password.  This in turn is passed to the System 7 server (or AppleShare server) and an attempt is made to log in to the server.  If the log in fails, an attempt is made to log in as a guest user.  If either attempt succeeds, the volume is made available to the user.  If the user tries to log in as either the owner or a user, they must successfully (non-anonymously) log in to at least one local volume or the whole connection is disallowed.  Since all file system access is done through the AppleShare protocols, it should be virtually impossible to circumvent their protections.  You should set up your system in such a way that irrespective of the privileges in NetPresenz Setup (which are not guaranteed in any way!) the user cannot do too much damage.  Thus users and guests should only have write privileges to areas of your file system that you wish them to be able to trash.
  68.  
  69. Version History
  70.  
  71. 4.0.1
  72. ~Fixed security hole with anonymous FTP (dont ask, I wont answer)
  73. ~AFP dates off by four seconds.
  74. ~Summary:NetPresenz can quit NetPresenz.
  75.  
  76. 4.0
  77. ~New name メNetPresenzモ
  78. ~CGI support
  79. ~Open Transport support
  80. ~Support for the resume command
  81. ~Rewrote all network transfer code
  82. ~Support modtime (MDTM)
  83.  
  84. 3.0.0
  85. ~native
  86. ~www
  87. ~OT compatibility (hopefully)
  88. ~SIVC
  89. ~Warn if no Internet Config
  90. ~New About Box
  91. ~one anon session, shared between all anon accesses
  92. ~sped up SMNT
  93. ~more listeners (up to 5 FTP and 5 HTTP listeners)
  94. ~File Sharing is starting message
  95. ~change permissions reply is bogus
  96. ~Show whether FTPd is running in summary window
  97. ~Balloon help
  98. ~Log Window now a WIND resource
  99. ~Font/size spec for the log window (via resedit)
  100. ~WTF is .info doing
  101. ~word wrap the startup messages.
  102. ~FTPd setup saving info problem
  103.  
  104. 2.4.0d5
  105. ~Use %20 if a file name starts or ends with a space
  106. ~Added a preference for None, Speak, Play Sound connection notification.
  107. ~Fixed a problem with freezes during login
  108. ~Fixed? a problem with ABORting the connection.
  109.  
  110. 2.4.0d3
  111. ~Universal Interfaces - ouch.
  112. ~Summary window.
  113. ~dont swallow returns in the Initial Command field.
  114. ~Use %FF for unprintables in paths.  Accept %FF or =FF.
  115. ~geneva 9 log window
  116. ~warnings on ASCII/dataforkonly transfers of files that require Binary/resources
  117.  
  118. 2.4.0d2
  119. ~STR# 180 maps file types to gopher types
  120. ~support gopher type "-" (ignore)
  121. ~Hide the "!Gopher Links" file
  122. ~Internet Config support
  123. ~Use only english months, otherwise it confuses clients like Anarchie
  124. ~speak text doesn't work?
  125. ~listing a directory with no files gives an error.
  126. ~file sharing disabled error instead of -1025.
  127. ~SIZE blib returns garbage instead of an error
  128.  
  129. 2.3.0d10
  130. Added SITE V statistics
  131. Added "I Paid" flag
  132. Changed from // to =3D and =2F encoding (MIME-like)
  133. Limit SITE INDEX to 1000 entries
  134. Fixed evil evil crashing bug
  135. Fixed SMNT problems
  136.  
  137. 2.3.0d1
  138. Vastly simplified FTPd Setup
  139. Removed 200 file limit of searches and directory listings
  140. Much improved transfer speeds in most cases
  141. Complete rewrite of the login code
  142. Complete rewrite of the AFP code
  143. Async IO for all transfers
  144.  
  145. 2.2.1d1
  146. ~FTPd Setup Gopher Listing could crash.
  147. ~Read the prefs file only when the mod date changed
  148. ~!Gopher Links file inside an alias to a folder didn't work
  149.  
  150. 2.2.0d1
  151. ~Use port 20 for Active data connections, should improve behaviour with firewalls
  152. ~Attempt to support A/UX's lack of mtcp gestalt selector
  153. ~Support append (APPE) command
  154. ~Support for the SIZE command (but its approximate!)
  155. ~Put FTP and gopher port (21&70) into STR# resources
  156.  
  157. 2.1.1d4
  158. ~Added option to display file size in gopher listings
  159. ~Added support for TextToSpeach manager
  160. ~Fixed gopher error message
  161. ~Fixed bug that stopped gopher type changes from being saved
  162. ~added メsafegetモ feature to simplify prefs management
  163. ~Added CautionAlert for Server and Far Server privs
  164.  
  165. 2.1.1d3
  166. ~Handle the virtual "." directory (for current directory)
  167. ~Fixed FillWindow to work with small log files.
  168. ~Fixed JPEG and GIFf gopher display
  169. ~added handling for LIST *.hqx, so mget *.hqx works.
  170.  
  171. 2.1.0d3
  172. ~Improved security, users and owner MUST log in to at least one local volume.
  173. ~Fixed SMNT and SITE commands to allow slashes
  174. ~Minor change to balloon help
  175. ~Fixed ":" option in Prefs window (wasnt being saved)
  176.  
  177. 2.1.0d2
  178. ~Gopher window add link etc selects item
  179. ~Notification sound for connections .
  180. ~Option to hide log window when in the background.
  181. ~GIF,JPEG support?
  182. ~Way to specify the host name for this Mac.
  183. ~gopher remote telnet
  184. ~Implement the Security window to give control over what commands are allowed
  185. ~If you open preferences (in this case the default use logon path), and make a change eg the default path, then click "Cancel" the change is applied anyway.
  186.  
  187. 2.1.0d1
  188. ~support SITE A QUIT <creator>, SITE A OAPP <creator>, and SITE A LIST.
  189. ~added -t option to listings to display the type/creator of files.
  190. ~button for Edit Attributes - double click should not be required
  191. ~option-double clicking Folders open's a new Gopher Listing Window.
  192. ~support SMNT Volume:Server[@Zone][:username[:password]] - mount a volume.
  193.  ~Sort the gopher directory.
  194. ~TurboGopher+1.6 sends "<tab>+" invalid line to FTPd? - accept and ignore it
  195. ~Debilitating Gopher bug that leaves all the files/folders inaccessible.
  196. ~Doesn't notice enabling gopher without restarting FTPd.
  197. ~No balloon help for Add index Entry.
  198. ~Retry count balloon help and static text messages differ.
  199. ~Drop folders don't have the x bit set.
  200. ~PASV command doesn't work with proxy ftp?
  201. ~FTPd doesn't notice changes to the translation prefs unless restarted.
  202. ~Fixed some capitalisations in the various FTPd Setup windows.
  203.  
  204. 2.0.1 Fourth release (1 day later!)
  205. ~Fixed a bug in FTPd Setup that could eat users' files.
  206.  
  207. 2.0.0 Third release
  208.  
  209. 2.0.0d17
  210. ~FTPd Setup, Gopher Listing needs to recognize Aliases to folders.
  211. ~Fixed a glitch with listing a folder with a single folder in it
  212. ~Changed the log strings abit to allow easier parsing.
  213.  
  214. 2.0.0d14
  215. ~Send "Transfer Finished" after last send in Send Format (might speed up the close)
  216. ~Long TCP close time after file transfer?
  217. ~Disabled some DebugStrs that probably shouldnt have been there.
  218. ~Reduce the size of Get and List connections
  219. the combination of those three caused these crashes:
  220. ~File transfer crashes - Scott Gruby
  221. ~Listing crashes - John Norstad
  222. ~Fixed a bug that caused alias resolution to fail (forgot to initialize the path, oops)
  223. ~Added GopherRoot user to allow aliases to point outside the Gopher tree.
  224. ~Link files owned by FTPd Setup, double clicking them opens Gopher Listing.
  225. ~Don't add .hqx to the end of folder aliases
  226. ~SetPort to stop List Clicks in Gopher Listing from failing (maybe)
  227.  
  228. 2.0.0d10
  229. ~Long TCP close time after file transfer - might help.
  230. ~Alias support - its impossible, but do it anyway.
  231. ~Option to disable .hqx in gopher listings
  232. ~Preference for ignoring /
  233. ~Need to do reverse name lookup for name
  234. ~Don't list folders the user can't access
  235. ~Extend close timeout from 20 seconds to 2 minutes - THANKS JOHN!!!!!
  236.  
  237. 2.0.0d8
  238. ~archie-like index support
  239. ~SITE INDEX as a synonym for SITE F
  240. ~Only log in to volumes you can access (Gopher and FTP)
  241. ~Gopher logging
  242. ~editable type field
  243. ~Gopher links not read by gopher listing?
  244. ~Support user directory for user "gopher" to set the gopher root
  245. ~Handle Revert on user directory listing properly
  246.  
  247. 2.0.0d7
  248. ~Gopher UI for defining links and renaming files
  249. ~Enable/Disable FTPd/Gopher independently
  250.  
  251. 2.0.0d6
  252. ~Support Scrambled&Two-way passwords.
  253.  
  254. 2.0.0d5
  255. ~Fixed an annoying bug that caused the server to occasionally lock connections up.
  256. (if it got more than 10 events in a row, it lost the last one!)
  257. ~Run in either foreground or background depending on the SIZE=-1 backgroundonly bit
  258. ~Foreground log window
  259.  
  260. 2.0.0d2
  261. ~IP restrictions (as for ftp, but username gopher, userkind Guest).
  262. ~Fixed a bug that could give spurious errors during MacBinary receives.
  263.  
  264. 2.0.0d1
  265. ~Initial gopherd implementation
  266.  
  267. 1.2.0d3
  268. ~A way of setting folder privs
  269.  
  270. 1.2.0d2
  271. ~Support options to NLST and LIST -CspFl (cols, size in k, dir/, long)
  272. ~A way of changing passwords.
  273.  
  274. 1.2.0d1
  275. ~Handle changing from EtherTalk <-> Localtalk network connections.
  276.  
  277. 1.1.0 - Second official release
  278.  
  279. 1.1.0d10
  280. ~Fixed a async crash bug
  281. ~Display the trasfer size in メgetモ commands.
  282. ~Use Fetch Preferencesユ suffix mappings to set the type/creator on binary putユs.
  283.  
  284. 1.1.0d8
  285. ~More than 100 files in a directory. - now 200.
  286. ~Transfer speed - via transfer buffer sizes - buffer sizes were increased 2.5 times
  287. ~Access to files with a / in their name by doubling the /
  288. ~Notice write protected folders and refuse the STOR etc commands immediately
  289. ~Drop folder writes don't work.
  290. ~ISO character translation on file names and TEXT files
  291. ~Added Remote Site Restrictions
  292. ~Fixed a bug that caused problems if there was more than 20 servers in your zone
  293. ~Changed "Add .hqx" to not add .hqx for TEXT files
  294. ~Fixed an address error crash on 68000 machines
  295. ~Fixed a ReleaseResource/DisposHandle bug
  296. ~Fixed a bug with GetMHandle and PopupMenus (well, Apple fixed a bug which broke my code, so I fixed my code, hope it doesnユt break Appleユs! :-)
  297.  
  298. Think about it - all the following happened before FTPd was even released to the public:
  299.  
  300. 1.0.9 - First Official Release
  301. ~Added Balloon Help to FTPd Setup
  302.  
  303. 1.0.9b
  304. ~Changed to use a limited number of async logins to avoid problems with XPP
  305. ~Locks up looking for a server - added timeout and fixed a bug.
  306. ~Fixed a security loophole - disabling all access to users and guest didn't always.
  307. ~Added support for ls -F
  308. ~An option to add ".hqx" to the end of all file names in all listings.
  309. ~Removed the distinction between Local and Shared Points (whatever it was before :)
  310.  
  311. 1.0.8b
  312. ~Added logging of login failures.
  313. ~Added the number of volumes to the login message.
  314. ~Send a sensible message when file sharing is not active.
  315. ~Fixed a bug with SITE F which locked up if it found >100 files.
  316. ~Fixed an evil evil bug with Async logins.
  317. ~Changed lists unit to be ptr based instead of handle based.
  318. ~Closed the volumes before logging out so the Finder updates the little heads correctly.
  319.  
  320. 1.0.7b
  321. ~Fixed a bug that caused problems if the Start or Folder Info files were to big.
  322. ~Improved Server logins, it should now not freeze your Mac and should be faster to login in, though still very slow.
  323. ~Fixed a bug that made FTPd miss the start of binhex files.
  324. ~Changed SITE X to SITE Q.
  325. ~Added help on SITE ? commands: remotehelp "site f" for example...
  326.  
  327. 1.0.6b
  328. ~Fixed an annoying NBP lookup bug.
  329. ~Translate 8 bit to 7 bit characters when sending ascii files.
  330. ~Added command SITE F <filename> to return all the matching filenames.
  331. ~Fixed a bug that might speed up RETRieves a bit (and was very stupid!)
  332. ~Added username to all log entries (get, put, del, etc)
  333. ~Added primitive AE support to FTPd Setup
  334.  
  335. 1.0.5b
  336. ~Added a checkbox to disable the log file (and disable it by default)
  337. ~Restructure the files/folders used by FTPd.  There is now a folder called メFTPd Preferences トモ in the Preferences folder that contains the FTPd Preferences file, the FTPd Log file, and optionally the Startup Messages folder (which can also reside in FTPdユs folder).
  338. ~Name Startup Message file is displayed to user Name on login.
  339. ~Start the messages on the NNN- line (so NNN-first line of file).
  340. ~Fixed it so that file names that start with a space are handled correctly.
  341. ~Changed it so that Thingy Startup & !Folder Info are both returned at startup.
  342. ~Fix a bug with the time stamps in MacBinary files.
  343.  
  344. 1.0.4b
  345. ~Far servers
  346. ~Improved error reporting.
  347. ~Fix a bug that caused retrieves to fail.
  348.  
  349. 1.0.3b
  350. ~Honour invisible files.
  351. ~Maximum of 48 files listed (4k limit I expect).  Should be maximum of 100 (or more even?).
  352. ~Include GetInfo comments in MacBinary transfer.
  353. ~User definable text displayed on startup and dir entry?
  354. ~Maximum number of users.
  355. ~Idle time out setting.
  356. ~User time restrictions? Support "only after X, or before Y" time restriction.
  357.  
  358. 1.0.2b
  359. ~terminate the connection after five minutes or three failed logins.
  360. ~Support logins only when mac is idle.
  361. ~Support copy_inhibit.
  362. ~Fix up CRC calculation in MacBinary code.
  363. ~MacBinary and/or BinHex still broken - think I've got all the bugs out.
  364.  
  365. 1.0.1b
  366. ~Close connection after three failed logins.
  367. ~QuitBoth in Setup.
  368. ~Abort fails
  369. ~Background only app
  370.  
  371. 1.0.0b
  372. ~Notice prefs changes on the fly.
  373. ~Prefs for login directories.
  374. ~Doesnt start up MacTCP by itself.
  375. ~Fix log.
  376. ~Prefs for MacBinary default on/off.
  377.